<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>对象字面量创建对象</title>
</head>
<body>
	<script>
	/* 
	 字面量的写法每个属性之间用逗号隔开，两种方法都可以，但第二种更快方便
	 属性=属性名和值组成
	 属性名是字符串可以用引号引起来也可以不用但 是特殊字符一定要用如"#@%$35"
		
	 *//*
	var obj = new Object()
	obj.name="猪八戒";
	obj.gender="男";
	obj.hobby="吃饭"
	console.log(obj.name)
	obj.name="孙悟空";
	console.log(obj.name);
	console.log(typeof obj)
	
	var obj2={
		name:"唐僧",
		gendre:"男",
		student:{
			name:"白龙马",
			hobby:"舞剑"
		}
	}
	console.log(obj2.name)
	console.log(obj2.student.name)*/
	var x=10
	function fn(x){
        x++
        console.log(x)

	}
	
	fn(x)
   console.log(x)
   var b="1a";
   console.log(b/1)
   attr
</script>
</body>

</html>